DEF_CMD_(EXIT,  -100, 0, { EIP = commandLength; })
DEF_CMD_(ADD,    1,   0, { stack_push(&cpu.stack, stack_pop(&cpu.stack) + stack_pop(&cpu.stack)); EIP++; })
DEF_CMD_(SUB,    2,   0, { stack_push(&cpu.stack, stack_pop(&cpu.stack) - stack_pop(&cpu.stack)); EIP++; })
DEF_CMD_(MUL,    3,   0, { stack_push(&cpu.stack, stack_pop(&cpu.stack) * stack_pop(&cpu.stack)); EIP++; })
DEF_CMD_(DIV,    4,   0, { stack_push(&cpu.stack, stack_pop(&cpu.stack) / stack_pop(&cpu.stack)); EIP++; })
DEF_CMD_(PUSH,   5,   2, {})
DEF_CMD_(PUSH_N, 6,   0, { stack_push(&cpu.stack, command[EIP + 1]); EIP += 2; })
DEF_CMD_(PUSH_R, 7,   0, { pushRegister(&cpu, (int)command[EIP + 1]); EIP += 2; })
DEF_CMD_(POP,    8,   1, {  popRegister(&cpu, (int)command[EIP + 1]); EIP += 2; })
DEF_CMD_(OUT,    9,   1, { outputFromRegister(CPU_t *cpu, double * command); EIP++; })
DEF_CMD_(IN,    10,   1, {    inputToRegister(CPU_t *cpu, double * command); EIP++; })
DEF_CMD_(JMP,   11,  -1, { EIP = (int)command[EIP + 1]; })
DEF_CMD_(JA,    12,  -1, { double a = stack_pop(&cpu.stack); double b = stack_pop(&cpu.stack); if(a < b)  EIP = (int)command[EIP + 1]; else EIP += 2; stack_push(&cpu.stack, b); stack_push(&cpu.stack, a); })
DEF_CMD_(JAE,   13,  -1, { double a = stack_pop(&cpu.stack); double b = stack_pop(&cpu.stack); if(a <= b) EIP = (int)command[EIP + 1]; else EIP += 2; stack_push(&cpu.stack, b); stack_push(&cpu.stack, a); })
DEF_CMD_(JB,    14,  -1, { double a = stack_pop(&cpu.stack); double b = stack_pop(&cpu.stack); if(a > b)  EIP = (int)command[EIP + 1]; else EIP += 2; stack_push(&cpu.stack, b); stack_push(&cpu.stack, a); })
DEF_CMD_(JBE,   15,  -1, { double a = stack_pop(&cpu.stack); double b = stack_pop(&cpu.stack); if(a >= b) EIP = (int)command[EIP + 1]; else EIP += 2; stack_push(&cpu.stack, b); stack_push(&cpu.stack, a); })
DEF_CMD_(JE,    16,  -1, { double a = stack_pop(&cpu.stack); double b = stack_pop(&cpu.stack); if(a == b) EIP = (int)command[EIP + 1]; else EIP += 2; stack_push(&cpu.stack, b); stack_push(&cpu.stack, a); })
DEF_CMD_(JNE,   17,  -1, { double a = stack_pop(&cpu.stack); double b = stack_pop(&cpu.stack); if(a != b) EIP = (int)command[EIP + 1]; else EIP += 2; stack_push(&cpu.stack, b); stack_push(&cpu.stack, a); })
DEF_CMD_(CALL,  18,  -1, { stack_push(&cpu.callStack, EIP); EIP =(int) command[EIP + 1]; })
DEF_CMD_(RET,   19,  -1, { EIP = (int)stack_pop(&cpu.callStack); })
